import request from '@/utils/request'
import { subUrl } from '@/api/dev'
const tempUrl = `${subUrl}/alarm`

export function getAll(data) {
  return request({
    url: `${tempUrl}/getAll`,
    method: 'post',
    data,
  })
}
//项目下的故障统计数据
export function getAllByCostNumber(data) {
  return request({
    url: `${tempUrl}/getAllByCostNumber`,
    method: 'post',
    data,
  })
}
//项目总览数据
export function getTotalDataByCostNumber(data) {
  return request({
    url: `${tempUrl}/getTotalDataByCostNumber`,
    method: 'post',
    data,
  })
}
export function getAllByDevice(data) {
  return request({
    url: `${tempUrl}/getAllByDevice`,
    method: 'post',
    data,
  })
}

export function getProductLineDataForDay(data) {
  return request({
    url: `${tempUrl}/getProductLineDataForDay`,
    method: 'post',
    data,
  })
}

export function getProductLineDataForWeek(data) {
  return request({
    url: `${tempUrl}/getProductLineDataForWeek`,
    method: 'post',
    data,
  })
}

export function getProductLineDataForMonth(data) {
  return request({
    url: `${tempUrl}/getProductLineDataForMonth`,
    method: 'post',
    data,
  })
}

export function getProductLineDataForYear(data) {
  return request({
    url: `${tempUrl}/getProductLineDataForYear`,
    method: 'post',
    data,
  })
}

export function getAlarmLineDataForDay(data) {
  return request({
    url: `${tempUrl}/getAlarmLineDataForDay`,
    method: 'post',
    data,
  })
}

export function getAlarmLineDataForWeek(data) {
  return request({
    url: `${tempUrl}/getAlarmLineDataForWeek`,
    method: 'post',
    data,
  })
}

export function getAlarmLineDataForMonth(data) {
  return request({
    url: `${tempUrl}/getAlarmLineDataForMonth`,
    method: 'post',
    data,
  })
}

export function getAlarmLineDataForYear(data) {
  return request({
    url: `${tempUrl}/getAlarmLineDataForYear`,
    method: 'post',
    data,
  })
}

export const uploadExcleUrl = `${tempUrl}/uploadExcle`
